package com.ruoyi.project.platform.service.impl;

import java.util.List;

import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.platform.mapper.PltUserOrderDetailMapper;
import com.ruoyi.project.platform.domain.PltUserOrderDetail;
import com.ruoyi.project.platform.service.IPltUserOrderDetailService;

/**
 * 订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-27
 */
@Service
public class PltUserOrderDetailServiceImpl implements IPltUserOrderDetailService 
{
    @Autowired
    private PltUserOrderDetailMapper pltUserOrderDetailMapper;

    /**
     * 查询订单明细
     * 
     * @param detailId 订单明细ID
     * @return 订单明细
     */
    @Override
    public PltUserOrderDetail selectPltUserOrderDetailById(Long detailId)
    {
        return pltUserOrderDetailMapper.selectPltUserOrderDetailById(detailId);
    }

    /**
     * 查询订单明细列表
     * 
     * @param pltUserOrderDetail 订单明细
     * @return 订单明细
     */
    @Override
    @DataScope(userAlias = "u")
    public List<PltUserOrderDetail> selectPltUserOrderDetailList(PltUserOrderDetail pltUserOrderDetail)
    {
        return pltUserOrderDetailMapper.selectPltUserOrderDetailList(pltUserOrderDetail);
    }

    /**
     * 新增订单明细
     * 
     * @param pltUserOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int insertPltUserOrderDetail(PltUserOrderDetail pltUserOrderDetail)
    {
        return pltUserOrderDetailMapper.insertPltUserOrderDetail(pltUserOrderDetail);
    }

    /**
     * 修改订单明细
     * 
     * @param pltUserOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int updatePltUserOrderDetail(PltUserOrderDetail pltUserOrderDetail)
    {
        return pltUserOrderDetailMapper.updatePltUserOrderDetail(pltUserOrderDetail);
    }

    /**
     * 批量删除订单明细
     * 
     * @param detailIds 需要删除的订单明细ID
     * @return 结果
     */
    @Override
    public int deletePltUserOrderDetailByIds(Long[] detailIds)
    {
        return pltUserOrderDetailMapper.deletePltUserOrderDetailByIds(detailIds);
    }

    /**
     * 删除订单明细信息
     * 
     * @param detailId 订单明细ID
     * @return 结果
     */
    @Override
    public int deletePltUserOrderDetailById(Long detailId)
    {
        return pltUserOrderDetailMapper.deletePltUserOrderDetailById(detailId);
    }
}
